﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Display.CollectionsUI {
    import flash.events.*;
    import Engine.Managers.*;
    import flash.display.*;
    import Engine.Helpers.*;
    import Events.*;
    import org.aswing.*;
    import Classes.*;
    import Display.MarketUI.*;
    import Display.aswingui.*;
    import Modules.stats.types.*;
    import Display.hud.*;

    public class ExpandedInventoryMenu extends ExpandedMenu {

        protected var m_collectionsButton:JButton;
        protected var m_collectionsLabel:JLabel;
        protected var m_inventoryButton:JButton;
        protected var m_inventoryLabel:JLabel;
        protected var m_franchiseButton:JButton;
        protected var m_franchiseLabel:JLabel;

        public function ExpandedInventoryMenu(_arg1=null, _arg2:Boolean=false){
            super(_arg1, _arg2);
        }
        override protected function makeContent():void{
            m_content = ASwingHelper.makeSoftBoxJPanelVertical(SoftBoxLayout.CENTER, 0);
            m_bg = (new EmbeddedArt.hud_act_bg() as DisplayObject);
            var _local1:AssetBackground = new AssetBackground(m_bg);
            m_content.setBackgroundDecorator(_local1);
            m_content.setPreferredWidth(m_bg.width);
            this.m_collectionsButton = new JButton();
            this.m_collectionsLabel = new JLabel(ZLoc.t("Main", "Collections"));
            this.m_inventoryButton = new JButton();
            this.m_inventoryLabel = new JLabel(ZLoc.t("Dialogs", "InventoryTitle"));
            this.m_franchiseButton = new JButton();
            this.m_franchiseLabel = new JLabel(ZLoc.t("Main", "Franchise"));
            m_content.append(ASwingHelper.verticalStrut(15));
            makeButton(EmbeddedArt.hud_act_collection, this.m_collectionsButton, this.m_collectionsLabel);
            makeButton(EmbeddedArt.hud_act_inventory, this.m_inventoryButton, this.m_inventoryLabel);
            makeButton(EmbeddedArt.hud_actMenu_franchise, this.m_franchiseButton, this.m_franchiseLabel);
            m_content.append(ASwingHelper.verticalStrut(20));
            attachButtonHandlers(this.m_collectionsButton, this.onCollectionsClick, this.onCollectionsHover, this.onCollectionsOut);
            attachButtonHandlers(this.m_inventoryButton, this.onInventoryClick, this.onInventoryHover, this.onInventoryOut);
            attachButtonHandlers(this.m_franchiseButton, this.onFranchiseClick, this.onFranchiseHover, this.onFranchiseOut);
        }
        protected function onCollectionsClick(_arg1:Event):void{
            StatsManager.sample(100, StatsCounterType.HUD_COUNTER, StatsKingdomType.STORAGE_MENU, "collections");
            dispatchEvent(new UIEvent(UIEvent.ACTION_MENU_CLICK, UIEvent.SHOW_COLLECTIONS));
        }
        protected function onCollectionsHover(_arg1:Event):void{
            this.m_collectionsLabel.setTextFilters([glow_lbl]);
        }
        protected function onCollectionsOut(_arg1:Event):void{
            this.m_collectionsLabel.setTextFilters([]);
        }
        protected function onInventoryClick(_arg1:Event):void{
            StatsManager.sample(100, StatsCounterType.HUD_COUNTER, StatsKingdomType.STORAGE_MENU, "inventory");
            dispatchEvent(new UIEvent(UIEvent.ACTION_MENU_CLICK, UIEvent.SHOW_INVENTORY));
        }
        protected function onInventoryHover(_arg1:Event):void{
            this.m_inventoryLabel.setTextFilters([glow_lbl]);
        }
        protected function onInventoryOut(_arg1:Event):void{
            this.m_inventoryLabel.setTextFilters([]);
        }
        protected function onFranchiseClick(_arg1:Event):void{
            StatsManager.sample(100, StatsCounterType.HUD_COUNTER, StatsKingdomType.STORAGE_MENU, "franchise");
            dispatchEvent(new UIEvent(UIEvent.ACTION_MENU_CLICK, UIEvent.SHOW_FRANCHISE));
        }
        protected function onFranchiseHover(_arg1:Event):void{
            this.m_franchiseLabel.setTextFilters([glow_lbl]);
        }
        protected function onFranchiseOut(_arg1:Event):void{
            this.m_franchiseLabel.setTextFilters([]);
        }
        override public function getDesiredPosition(_arg1:Catalog=null):Vector2{
            return (new Vector2(685, 254));
        }

    }
}//package Display.CollectionsUI 
